//part1:C03:ex3.23.cpp -- vector with 10 elements.
#include <iostream>
#include <vector>
#include <ctime>
#include <cstdlib>

int main(void)
{
    using namespace std;
    vector<int> vInt;
    srand((unsigned)time(NULL));
    for (int i = 0; i < 10; ++i)
    {
        vInt.push_back(rand() % 1000);    
    }
    cout << "random number is :" << endl;
    for (auto it = vInt.cbegin(); it != vInt.cend(); it++)
    {
        cout << *it << " ";    
    }
    cout << endl;
    cout << " 2 time of last 10 elements are:\n";
    for (auto it = vInt.begin(); it != vInt.end(); it++)
    {
        *it *= 2;
        cout << *it << " ";
    }
    cout << endl;
    
    return 0;
}
